export interface ICreateProduct {
  categoryId: number
  name: string
  description: string
  oldPrice: number
  newPrice: number
  imgList: string[]
}
export namespace productsRes {
  export interface Product {
    id: number
    userId: number
    categoryId: number
    name: string
    description: string
    oldPrice: number
    newPrice: number
    imgList: string[]
    createTime: Date
    updateTime: Date
  }

  export interface Data {
    products: Product[]
    totalCount: number
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}

export namespace productDetail {
  export interface User {
    id: number
    name: string
    mail: string
    phone: string
    wechat: string
    qq: string
    role: string
    createTime: Date
    updateTime: Date
  }

  export interface Product {
    id: number
    userId: number
    categoryId: number
    name: string
    description: string
    oldPrice: number
    newPrice: number
    imgList: string[]
    createTime: Date
    updateTime: Date
    user: User
  }

  export interface Data {
    product: Product
  }

  export interface RootObject {
    statusCode: number
    message: string
    data: Data
  }
}
